#if !defined(ximera_graphics_iscenenode_hpp)
#define ximera_graphics_iscenenode_hpp

// -----------------------------------------------------------

#include <ximera/config.hpp>
#include <ximera/types.hpp>
#include <ximera/graphics/attachable.hpp>
#include <ximera/common/sharedptr.hpp>

namespace ximera { namespace graphics
{
    class IWorld;

    class XIMERA_API ISceneNode
    {
    public:
        virtual ~ISceneNode();

        virtual IWorld* world() = 0;

        virtual math::Vector3 position() const = 0;
        virtual void position(math::Vector3 const& pos) = 0;

        virtual math::Quaternion orientation() const = 0;
        virtual void orientation(math::Quaternion const& quat) = 0;

        virtual math::Matrix3 orientationMatrix() const = 0;
        virtual void orientationMatrix(math::Matrix3 const& orient) = 0;

        virtual void scale(Real scale) = 0;
        virtual void scale(Real x, Real y, Real z) = 0;
        virtual void scale(math::Vector3 const& scale) = 0;

        virtual void roll(Real angle) = 0;
        virtual void yaw(Real angle) = 0;
        virtual void pitch(Real angle) = 0;

        virtual void direction(math::Vector3 const& dir) = 0;
        virtual void lookAt(math::Vector3 const& point) = 0;

        virtual String const& name() const = 0;
        virtual void name(String const& name) = 0;

        virtual ISceneNode* parent() const = 0;

        virtual UInt32 childCount() const = 0;
        virtual ISceneNode* child(UInt32 index) const = 0;

        virtual ISceneNode* createChild(String const& name = L"") = 0;
        virtual void addChild(ISceneNode* node) = 0;
        virtual void removeChild(ISceneNode* node) = 0;
        virtual void removeAllChildren() = 0;

        virtual bool isChild(ISceneNode* node) = 0;

        virtual ISceneNode* findChild(String const& name) = 0;
        virtual ISceneNode* findDescendant(String const& name) = 0;

        virtual void attach(Attachable* object) = 0;
        virtual void detach(Attachable* object) = 0;
    };

    typedef SharedPtr<ISceneNode> ISceneNodePtr;
}}

// -----------------------------------------------------------

#endif
